<div class="art-post">
    <div class="art-post-tl"></div>
    <div class="art-post-tr"></div>
    <div class="art-post-bl"></div>
    <div class="art-post-br"></div>
    <div class="art-post-tc"></div>
    <div class="art-post-bc"></div>
    <div class="art-post-cl"></div>
    <div class="art-post-cr"></div>
    <div class="art-post-cc"></div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">[<?php echo ($action=='add')?'Thêm':'Sửa'; ?> Bản tin]</h2>

            <form action="<?php echo Utility::currentUrl();?>" method="post" id="fr">
        <span id="message" style="color:red;font-weight:bold;background-color:#f0f8ff;">
        <?php
 if(isset($error))
 {
    ?>
    <ul>
    <?php
    foreach($error as $err)
    {
        echo "<span class='error-notification'>* $err</span><br/>";
    }
    ?>
    </ul>
    <?php
 }

        if(isset($message))
        {
            echo "<span class='message-notification'>* $message</span><br/>";
        }

        if(isset($inserted_id))
        {
            $base_url = Utility::baseUrl();
            $link = $base_url . '/recruitment/show/' . $inserted_id;
            echo "<span class='message-notification'>* Xem bài viết tại : <a href='$link'>$link</a> <br/></span><br/>";
        }
        echo "<br/>";
        ?>
    </span>
                <input type="hidden" name="action" id="action" value="<?php echo $action; ?>"/>
                <table class="tbl-form">
                    <tr>
                        <th valign="top">Tiêu đề</th>
                        <td><input type="text" class="form-input" name="title"
                                   value="<?php  if(isset($input)) echo $input->title;?>"/>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">Tóm tắt</th>
                        <td><textarea rows="10" name="summary" class="form-textarea"><?php  if(isset($input))  echo $input->
                            summary;?></textarea></td>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">Tóm tắt</th>
                        <td><textarea rows="5" cols="50" name="detail" id="detail"
                                      class="form-textarea"><?php  if(isset($input)) echo $input->
                            detail;?></textarea><br />
                            <input
                                type="button" value="thêm ảnh"
                                onclick="window.open('<?php echo Utility::getSiteUrl(); ?>/upload ','Upload','menubar=no,width=800,height=500,toolbar=no')"/>
                        </td>
                    </tr>
                    <script type="text/javascript">
                        CKEDITOR.replace('detail');
                    </script>
                    <tr>
                        <th valign="top">
                            Trạng thái
                        </th>
                        <?php
                            $status = 1;
                            if(isset($input)) $status = $input->status;
                        ?>
                        <td><select class="styledselect_form_1" name="status" style="width:305px;">
                            <option value="1" <?php if($status == 1) echo "selected='selected'"; ?> >Hiển thị</option>
                            <option value="0" <?php if($status == 0) echo "selected='selected'"; ?> >Không hiển thị</option>
                        </select>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit" name="submit" value="<?php if($action =='add') echo " Thêm"; else echo "Sửa";?>"
                            >&nbsp;&nbsp;<input type="reset" value="Nhập lại"></td>
                    </tr>
                </table>
            </form>

        </div>

        <div class="cleared"></div>
    </div>
</div>